package com.pactera.asmp.server.service;

import com.pactera.asmp.server.entity.ProjectDeviceBindDto;
import com.pactera.asmp.server.entity.ProjectDeviceDbcBindDto;
import com.pactera.asmp.server.entity.ResponseResult;
import com.pactera.asmp.server.pojo.DeviceProjectDbcVo;
import com.pactera.asmp.server.pojo.ProjectDeviceDbc;
import com.pactera.asmp.server.pojo.TProjectDeviceDbc;
import com.pactera.asmp.server.pojo.TProjectDeviceDbcDetail;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: asmp-server
 * @Package com.pactera.asmp.server.service
 * @ClassName: IProjectDeviceDbcService
 * @Description: IProjectDeviceDbcService
 * @Date 2020/07/24 16:34
 * @Author lvzhiqiang
 * @Version 1.0
 */
public interface IProjectDeviceDbcService {
    /**
     * 添加项目与设备关联
     * @param projectDeviceDbcs
     * @return
     */
    int insert(List<TProjectDeviceDbc> projectDeviceDbcs);

    /**
     * 更新设备、dbc关联
     * @param projectDeviceDbcBindDto
     * @return
     */
    int updateDbc(ProjectDeviceDbcBindDto projectDeviceDbcBindDto);

    /**
     * 批量删除
     * @param projectDeviceDbcs
     * @return
     */
    int batchDelete(List<TProjectDeviceDbc> projectDeviceDbcs);

    /**
     * 根据条件查询数据
     * @param projectId
     * @param deviceId
     * @return
     */
    List<TProjectDeviceDbc> selective(Integer projectId, Integer deviceId);

    /**
     * 根据 duid 获取对应已绑定项目名和dbc名
     * @param duid
     * @return
     */
    List<Map> queryProjectAndDbcByDuid(String duid);

    /**
     * 项目设备批量绑定
     * @param projectDeviceBindDto
     * @return
     */
    int batchBind(ProjectDeviceBindDto projectDeviceBindDto);

    ResponseResult deviceBind(DeviceProjectDbcVo deviceProjectDbcVo);

    List<TProjectDeviceDbcDetail> selective2(Integer projectId, Integer deviceId,String duid);

    List<ProjectDeviceDbc> getProjectDeviceDbcsByDeviceId(Integer deviceId);
}
